from __future__ import annotations

class StrSearcher:
    def __init__(self, txt: str) -> None:
        self.txt = txt

        self.idx = 0
        self.results = []
    
    def seek(self, idx: int) -> StrSearcher:
        self.idx = idx
        return self
    
    def skip(self, num: int) -> StrSearcher:
        self.idx += num
        return self

    def s(self, target: str, usrdata=None) -> StrSearcher:
        try:
            res = self.txt.index(target, self.idx)
            end = res + len(target)
            self.results.append(([res, end], usrdata))

            self.idx = end

        except ValueError:
            pass

        return self
